package com.citcc.business.service;

import com.citcc.business.bean.CdzManufacturer;
import com.citcc.business.mapper.CdzManufacturerMapper;
import com.citcc.business.mapper.CdzStakeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CdzManufacturerService {

    private final CdzManufacturerMapper cdzManufacturerMapper;
    private final CdzStakeMapper cdzStakeMapper;

    @Autowired
    public CdzManufacturerService(CdzManufacturerMapper cdzManufacturerMapper,CdzStakeMapper cdzStakeMapper){
        this.cdzManufacturerMapper=cdzManufacturerMapper;
        this.cdzStakeMapper=cdzStakeMapper;
    }

    public List<CdzManufacturer> selectAllList(CdzManufacturer manufacturer){
        return cdzManufacturerMapper.selectAllList(manufacturer);
    }

    public int add(CdzManufacturer manufacturer){
        return cdzManufacturerMapper.insertSelective(manufacturer);
    }

    public int uodate(CdzManufacturer manufacturer){
        return cdzManufacturerMapper.updateByPrimaryKeySelective(manufacturer);
    }

    public int delete(String id){
        return cdzManufacturerMapper.deleteByPrimaryKey(id);
    }

    public CdzManufacturer getManufacturer(String id){
        return cdzManufacturerMapper.selectByPrimaryKey(id);
    }

}
